﻿#pragma once

#include <learn/ais/ais_object.h>

namespace xi
{

namespace ais
{

class EXT_SYMBOL AIS_Frame : public AIS_Object
{
  public:
    AIS_Frame(AIS_Frame &&) = delete;

    struct Rect
    {
        int left, top, width, height;
    };

    /**
     * @brief 设置矩形信息
     *
     * @param[in] left
     * @param[in] top
     * @param[in] width
     * @param[in] height
     */
    explicit AIS_Frame(int left, int top, int width, int height);

    /**
     * @brief 获得矩形信息
     *
     * @return * Rect
     */
    Rect rect() const;

    /**
     * @brief 获得矩形信息
     *
     * @return Rect&
     */
    Rect &rect();

    /**
     * @brief 初始化消息
     *
     * @param[in] msg
     */
    void visit(AIS_InitMsg *msg) override;

  protected:
    Rect m_rect;
};

} // namespace ais

} // namespace xi
